part of 'alert.dart';

class AlertResetConfirm extends StatelessWidget {
  final void Function(int i)? onPressed;
  const AlertResetConfirm({Key? key, this.onPressed}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return UnconstrainedBox(
        child: Material(
      color: Colors.transparent,
      child: Container(
        decoration: kAlertBoxDecoration,
        clipBehavior: Clip.hardEdge,
        height: 150,
        width: 300,
        child: Column(
          children: [
            Expanded(
              child: Row(
                children: [
                  Padding(
                    padding: const EdgeInsets.all(8.0),
                    child: 'al_upload_ask'.uiimg,
                  ),
                  Expanded(
                    child: Text(
                      'Please Confirm Reset DSP Tuning?',
                      style: TextStyle(color: Colors.white),
                    ),
                  ),
                ],
              ),
            ),
            Container(
              color: Colors.white,
              height: 44,
              child: Row(
                children: [
                  Expanded(
                    child: TextButton(
                        onPressed: () => onPressed?.call(0),
                        child: Text(
                          'YES',
                          style: TextStyle(color: kAlertBgColor),
                        )),
                  ),
                  VerticalDivider(
                    color: kAlertBgColor,
                    width: 10,
                  ),
                  Expanded(
                    child: TextButton(
                        onPressed: () => onPressed?.call(1),
                        child:
                            Text('NO', style: TextStyle(color: kAlertBgColor))),
                  ),
                ],
              ),
            ),
          ],
        ),
      ),
    ));
  }
}
